<header id="topbar" class="affix">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a href="<%= window.location.href %>">彩种详情</a>
            </li>
            <li class="crumb-trail">编辑</li>
        </ol>
    </div>
    <div class="pull-right">
        <a href="javascript:;" class="btn btn-primary btn-sm light fw600 ml10" id='save'><span class="fa fa-save"></span>保存</a>
    </div>
</header>
<section id="content">
    <div class="panel">
        <form class="form-horizontal">
            <div class="form-group">
                <label class="col-md-1 control-label">图像:</label>
                <div class="col-md-1" id="container">
                    <a class="image-popup" href="<%= info.image %>"><img src="<%= info.image %>" alt="图像" id="image" class="fix-icon" data-field="image"></a>
                    <button id="uploadImage" class="form-control" data-img="image">更换图像</button>
                </div>
            </div>
            <div class="form-group">
                <label for="inputType" class="col-md-1 control-label">彩种：</label>
                <div class="col-md-4">
                    <select data-type="int" data-field="type" class="form-control" id="selectLottery">
                        <% _.each(window.NEW_LOTTERY_TYPE, function(v, k){ %>
                            <option value="<%= k %>" <%= parseInt(info.type) == k ? "selected" : "" %> > <%= v %> </option>
                        <% }) %>
                    </select>
                </div>
                <label for="inputType" class="col-md-1 control-label">默认玩法：</label>
                <div class="col-md-4">
                    <select data-type="int" data-field="bet_type" class="form-control" id="betType">
                        <option value="0">无</option>
                        <% _.each(window.BET_TYPE[info.type], function(v, k){ %>
                            <option value="<%= k %>" <%= parseInt(info.bet_type) == k ? "selected" : "" %> > <%= v %> </option>
                        <% }) %>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="inputCmd" class="col-md-1 control-label">Tab：</label>
                <div class="col-md-4">
                    <select data-type="int" data-field="tab" class="form-control" id="Tab">
                        <% _.each(tabs, function(v, k){ %>
                            <option value="<%= v.id %>" <%= parseInt(info.tab) == v.id ? "selected" : "" %> > <%= v.name %> </option>
                        <% }) %>
                    </select>
                </div>
                <label class="col-md-1 control-label">平台：</label>
                <div class="col-md-4">
                    <select data-type="int" data-field="platform" class="form-control">
                        <% _.each(window.PLATFORM_TYPE, function(v, k){ %>
                            <option value="<%= k %>" <%= parseInt(info.platform) == k ? "selected" : "" %> > <%= v %> </option>
                        <% }) %>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="inputCmd" class="col-md-1 control-label">Cmd：</label>
                <div class="col-md-4">
                    <input type="text" id="inputCmd" class="form-control" value="<%= info.cmd %>" data-field="cmd">
                </div>

                <label for="inputDesc" class="col-md-1 control-label">描述：</label>
                <div class="col-md-4">
                    <input type="text" id="inputDesc" class="form-control" value="<%= info.desc %>" data-field="desc">
                </div>
            </div>
            <% var moment = require('moment'); %>
            <div class="form-group">
                <label for="inputStartTs" class="col-md-1 control-label">生效时间：</label>
                <div class="col-md-4">
                    <input type="text" id="inputStartTs" class="form-control date-box" data-field="start_ts"
                    value=<%= info.start_ts %> required>
                </div>
                <label for="inputEndTs" class="col-md-1 control-label">失效时间：</label>
                <div class="col-md-4">
                    <input type="text" id="inputEndTs" class="form-control date-box" data-field="end_ts"
                    value=<%= info.end_ts %> required>
                </div>
            </div>
            <div class="form-group">
                <label for="inputSortID" class="col-md-1 control-label">顺序：</label>
                <div class="col-md-4">
                    <input type="text" id="inputSortID" class="form-control" value="<%= info.sort_id %>" data-field="sort_id" data-type=""int required>
                </div>
                <label for="inputPriority" class="col-md-1 control-label">优先级：</label>
                <div class="col-md-4">
                    <input type="text" id="inputPriority" class="form-control" value="<%= info.priority %>" data-field="priority" data-type="int">
                </div>
            </div>
            <div class="form-group">
                <label for="inputMinCvc" class="col-md-1 control-label">最小版本</label>
                <div class="col-md-4">
                    <input type="text" id="inputMinCvc" class="form-control" value="<%= info.min_cvc %>" data-field="min_cvc" data-type="int" required>
                </div>
                <label for="inputMaxCvc" class="col-md-1 control-label">最大版本</label>
                <div class="col-md-4">
                    <input type="text" id="inputMaxCvc" class="form-control" value="<%= info.max_cvc %>" data-field="max_cvc" data-type="int" required>
                </div>
            </div>
            <div class="form-group">
                <label for="inputDeviceType" class="control-label col-md-1">适配系统:</label>
                <div class="col-md-4">
                    <select class="multiselect form-control" multiple="multiple" id="inputDeviceType" data-field="device_type">
                        <% _.each(window.DEVICE_TYPE, function(v, k){ %>
                        <option value="<%= k %>" <%= info.device_type & k ? "selected" : "" %>> <%= v %> </option>
                        <% }) %>
                    </select>
                </div>
                <label class="col-md-1 control-label">状态：</label>
                <div class="col-md-4">
                    <% var btnText = info.off_status == 1 ? '已关闭' : '已开启' %>
                    <button class="btn btn-default btn-sm light fw600 ml10" type="button" id="activeBtn"><%= btnText %></button>
                </div>
            </div>
            <div class="form-group">
                <label for="inputChn" class="col-md-1 control-label">指定渠道：</label>
                <div class="col-md-4">
                    <input type="text" id="inputPassChn" class="form-control" value="<%= info.pass_chn %>" data-field="pass_chn">
                </div>
                 <label for="inputChn" class="col-md-1 control-label">排除渠道：</label>
                <div class="col-md-4">
                    <input type="text" id="inputChn" class="form-control" value="<%= info.exclude_chn %>" data-field="exclude_chn">
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-1 control-label">是否为新游戏：</label>
                <div class="col-md-4">
                    <select data-type="int" data-field="is_new_game" class="form-control">
                        <% _.each(window.IS_NEW_GAME, function(v, k){ %>
                            <option value="<%= k %>" <%= parseInt(info.is_new_game) == k ? "selected" : "" %> > <%= v %> </option>
                        <% }) %>
                    </select>
                </div>
                <label class="col-md-1 control-label">是否为热门游戏：</label>
                <div class="col-md-4">
                    <select data-type="int" data-field="is_hot_game" class="form-control">
                        <% _.each(window.IS_HOT_GAME, function(v, k){ %>
                            <option value="<%= k %>" <%= parseInt(info.is_hot_game) == k ? "selected" : "" %> > <%= v %> </option>
                        <% }) %>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="inputChn" class="col-md-1 control-label">停止开奖起始时间：</label>
                <div class="col-md-4">
                    <input type="text" id="beginStopLottery" class="form-control date-hour-box" value="<%= info.start_stop_lottery %>"  data-field="start_stop_lottery">
                </div>
                <label for="inputChn" class="col-md-1 control-label">停止开奖截止时间：</label>
                <div class="col-md-4">
                    <input type="text" id="endStopLottery" class="form-control date-hour-box" value="<%= info.end_stop_lottery %>"  data-field="end_stop_lottery">
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-1 control-label">是否竖屏：</label>
                    <div class="col-md-4">
                        <select data-type="int" data-field="is_vertical" class="form-control">
                            <% _.each(window.VERTICAL_STATUS, function(v, k){ %>
                                <option value="<%= k %>" <%= parseInt(info.is_vertical) == k ? "selected" : "" %> > <%= v %> </option>
                            <% }) %>
                        </select>
                    </div>
            </div>

        </form>
    </div>
</section>
